﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using HCM_maps_website.Models;
using HCM_maps_website.Process.BLL;
using System.Web.Http;

namespace XichLoMapAPI.Controllers
{
    public class PlaceController : ApiController
    {
        //
        // GET: /Place/
        public PlaceModels Get(double longtitude, double latitude)
        {
            return SearchBLL.GetNearPlaceCoordinate(new Coordinate(longtitude,latitude));
        }

        public IList<ServiceModel> Get(double longtitude, double latitude, float range)
        {
            ServiceBLL service = new ServiceBLL();
            return service.FindServiceAround(new Coordinate(longtitude, latitude), range);
        }

        public IList<ServiceModel> Get(int type, double longtitude, double latitude, float range)
        {
            ServiceBLL service = new ServiceBLL();
            return service.FindServiceAroundWithServiceType(type, new Coordinate(longtitude, latitude), range);
        }

    }
}
